package com.zhairuihao.common.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.kit.Ret;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.spi.LoggerFactoryBinder;

/**
 * .
 *
 * @author zhairuihao
 * @since 2020/6/9
 */

public class ExceptionInterceptor implements Interceptor {
    @Override
    public void intercept(Invocation inv) {
        try {
            inv.invoke();
        } catch (Exception e) {
            inv.getController().renderJson("系统繁忙,请稍后再试😀" + e.getMessage());
        }

    }
}
